/*
 Navicat MySQL Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50542
 Source Host           : localhost:3306
 Source Schema         : sudaiqianbao

 Target Server Type    : MySQL
 Target Server Version : 50542
 File Encoding         : 65001

 Date: 17/09/2018 17:22:31
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sd_admin
-- ----------------------------
DROP TABLE IF EXISTS `sd_admin`;
CREATE TABLE `sd_admin` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(255) DEFAULT NULL,
  `nickname` varchar(255) DEFAULT NULL,
  `password` char(32) DEFAULT NULL,
  `addtime` int(11) DEFAULT NULL,
  `is_use` tinyint(3) unsigned DEFAULT NULL,
  `header_img` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of sd_admin
-- ----------------------------
BEGIN;
INSERT INTO `sd_admin` VALUES (1, 'admin', 'sudaiqianbao', 'e10adc3949ba59abbe56e057f20f883e', 1536077266, 1, '/upload/user01.png');
COMMIT;

-- ----------------------------
-- Table structure for sd_admin_role
-- ----------------------------
DROP TABLE IF EXISTS `sd_admin_role`;
CREATE TABLE `sd_admin_role` (
  `admin_id` int(11) DEFAULT NULL,
  `role_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of sd_admin_role
-- ----------------------------
BEGIN;
INSERT INTO `sd_admin_role` VALUES (1, 1);
INSERT INTO `sd_admin_role` VALUES (2, 2);
INSERT INTO `sd_admin_role` VALUES (2, 3);
INSERT INTO `sd_admin_role` VALUES (3, 3);
INSERT INTO `sd_admin_role` VALUES (4, 2);
COMMIT;

-- ----------------------------
-- Table structure for sd_item
-- ----------------------------
DROP TABLE IF EXISTS `sd_item`;
CREATE TABLE `sd_item` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item` varchar(255) DEFAULT NULL,
  `pid` int(11) DEFAULT NULL,
  `ord` varchar(255) DEFAULT NULL,
  `price` decimal(10,2) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of sd_item
-- ----------------------------
BEGIN;
INSERT INTO `sd_item` VALUES (1, '您的职业身份是？', 0, '0', NULL);
INSERT INTO `sd_item` VALUES (2, '上班族', 1, '1', 800.00);
INSERT INTO `sd_item` VALUES (3, '企业主', 1, '2', 300.00);
INSERT INTO `sd_item` VALUES (4, '学生', 1, '3', 200.00);
INSERT INTO `sd_item` VALUES (5, '自由职业', 1, '4', 500.00);
INSERT INTO `sd_item` VALUES (6, '信用卡额度', 0, '1', NULL);
INSERT INTO `sd_item` VALUES (7, '无信用卡', 6, '1', 0.00);
INSERT INTO `sd_item` VALUES (8, '5000以下', 6, '2', 2000.00);
INSERT INTO `sd_item` VALUES (9, '5000-30000', 6, '3', 8000.00);
INSERT INTO `sd_item` VALUES (10, '30000以上', 6, '4', 8000.00);
INSERT INTO `sd_item` VALUES (11, '手机号码', 0, '2', NULL);
INSERT INTO `sd_item` VALUES (12, '非本人实名', 11, '1', -2000.00);
INSERT INTO `sd_item` VALUES (13, '实名，已使用1-3个月', 11, '2', 500.00);
INSERT INTO `sd_item` VALUES (14, '实名，已使用4-6个月', 11, '3', 1500.00);
INSERT INTO `sd_item` VALUES (15, '实名，已使用6个月以上', 11, '4', 3000.00);
INSERT INTO `sd_item` VALUES (16, '芝麻信用分', 0, '3', NULL);
INSERT INTO `sd_item` VALUES (17, '550分以下', 16, '1', -500.00);
INSERT INTO `sd_item` VALUES (18, '551分-600分', 16, '2', 1000.00);
INSERT INTO `sd_item` VALUES (19, '601分到650分', 16, '3', 2000.00);
INSERT INTO `sd_item` VALUES (20, '651分以上', 16, '4', 3000.00);
INSERT INTO `sd_item` VALUES (21, '期望贷款额度', 0, '4', NULL);
INSERT INTO `sd_item` VALUES (22, '1-3万', 21, '1', 0.00);
INSERT INTO `sd_item` VALUES (23, '3-5万', 21, '2', 0.00);
INSERT INTO `sd_item` VALUES (24, '5-10万', 21, '3', 3000.00);
INSERT INTO `sd_item` VALUES (25, '10万以上', 21, '4', 3000.00);
COMMIT;

-- ----------------------------
-- Table structure for sd_member
-- ----------------------------
DROP TABLE IF EXISTS `sd_member`;
CREATE TABLE `sd_member` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `real_name` varchar(255) DEFAULT NULL COMMENT '真实姓名',
  `idcard` varchar(255) DEFAULT NULL COMMENT '身份证',
  `phone` varchar(255) DEFAULT NULL COMMENT '手机',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for sd_member_item
-- ----------------------------
DROP TABLE IF EXISTS `sd_member_item`;
CREATE TABLE `sd_member_item` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `item` int(11) DEFAULT NULL,
  `member_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of sd_member_item
-- ----------------------------
BEGIN;
INSERT INTO `sd_member_item` VALUES (36, 4, 2);
INSERT INTO `sd_member_item` VALUES (37, 8, 2);
INSERT INTO `sd_member_item` VALUES (38, 12, 2);
INSERT INTO `sd_member_item` VALUES (39, 17, 2);
INSERT INTO `sd_member_item` VALUES (40, 22, 2);
INSERT INTO `sd_member_item` VALUES (41, 2, 3);
INSERT INTO `sd_member_item` VALUES (42, 8, 3);
INSERT INTO `sd_member_item` VALUES (43, 13, 3);
INSERT INTO `sd_member_item` VALUES (44, 18, 3);
INSERT INTO `sd_member_item` VALUES (45, 23, 3);
INSERT INTO `sd_member_item` VALUES (46, 8, 5);
INSERT INTO `sd_member_item` VALUES (47, 13, 5);
INSERT INTO `sd_member_item` VALUES (48, 18, 5);
INSERT INTO `sd_member_item` VALUES (49, 22, 5);
COMMIT;

-- ----------------------------
-- Table structure for sd_permission
-- ----------------------------
DROP TABLE IF EXISTS `sd_permission`;
CREATE TABLE `sd_permission` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `permission` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `type` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of sd_permission
-- ----------------------------
BEGIN;
INSERT INTO `sd_permission` VALUES (1, 'admin/index/index', '首页', 1);
INSERT INTO `sd_permission` VALUES (2, 'admin/member/index', '会员管理', 1);
COMMIT;

-- ----------------------------
-- Table structure for sd_role
-- ----------------------------
DROP TABLE IF EXISTS `sd_role`;
CREATE TABLE `sd_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of sd_role
-- ----------------------------
BEGIN;
INSERT INTO `sd_role` VALUES (1, 'admin');
INSERT INTO `sd_role` VALUES (2, 'user');
INSERT INTO `sd_role` VALUES (3, 'vip');
COMMIT;

-- ----------------------------
-- Table structure for sd_role_permission
-- ----------------------------
DROP TABLE IF EXISTS `sd_role_permission`;
CREATE TABLE `sd_role_permission` (
  `role_id` int(11) DEFAULT NULL,
  `permission_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of sd_role_permission
-- ----------------------------
BEGIN;
INSERT INTO `sd_role_permission` VALUES (2, 1);
INSERT INTO `sd_role_permission` VALUES (3, 1);
INSERT INTO `sd_role_permission` VALUES (3, 2);
INSERT INTO `sd_role_permission` VALUES (3, 3);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
